﻿do
	IGAS:NewAddon("IGAS_Studio")

	local _DB

	------------------------------------------------------------
	-- ScriptType
	------------------------------------------------------------
	_DB = CreateHelpDB(IGAS.GUI.Widget.TabGroup, "ScriptType")
	_DB:SetBaseHelpDB(CreateHelpDB(IGAS.GUI.Widget.Frame, "ScriptType"))

	_DB:AddCodeHelp("OnTabClose", [[ScriptType, Run when an tab is closed]], [[OnTabClose()]])
	_DB:AddCodeHelp("OnTabChange", [[ScriptType, Run when the an Tab is selected]], [[OnTabChange(oldTab, newTab)]])
	------------------------------------------------------------
	-- Function
	------------------------------------------------------------
	_DB = CreateHelpDB(IGAS.GUI.Widget.TabGroup, "Function")
	_DB:SetBaseHelpDB(CreateHelpDB(IGAS.GUI.Widget.Frame, "Function"))

	_DB:AddCodeHelp("AddTab", [=[Add or get a TabButton with the given text]=], [=[AddTab(tabText)]=])
	_DB:AddCodeHelp("HideCloseBtn", [=[Hide the close button]=], [=[HideCloseBtn()]=])
	_DB:AddCodeHelp("GetTab", [=[Get a TabButton with the given text]=], [=[GetTab(tabText)]=])
	_DB:AddCodeHelp("Dispose", [=[Dispose, release resource]=], [=[Dispose()]=])
	_DB:AddCodeHelp("GetSelectTab", [=[Get the select TabButton]=], [=[GetSelectTab()]=])
	_DB:AddCodeHelp("SelectTab", [=[Select a TabButton with the given text]=], [=[SelectTab(tabText)]=])
	_DB:AddCodeHelp("GetTabByIndex", [=[Get a TabButton with the given index]=], [=[GetTabByIndex(index)]=])
	_DB:AddCodeHelp("RemoveTab", [=[Remove a TabButton with the given text]=], [=[RemoveTab(tabText)]=])
	_DB:AddCodeHelp("ShowCloseBtn", [=[Show the close button]=], [=[ShowCloseBtn()]=])
	_DB:AddCodeHelp("RemoveTabByIndex", [=[Remove a TabButton with the given index]=], [=[RemoveTabByIndex(index)]=])
	------------------------------------------------------------
	-- Property
	------------------------------------------------------------
	_DB = CreateHelpDB(IGAS.GUI.Widget.TabGroup, "Property")
	_DB:SetBaseHelpDB(CreateHelpDB(IGAS.GUI.Widget.Frame, "Property"))

	_DB:AddCodeHelp("TabNum", [[the TabButtons' count, readonly]], IGAS:GetPropertyType("number"))
	_DB:AddCodeHelp("UseCloseBtn", [[Whether the close button is using or not]], IGAS:GetPropertyType("boolean"))
end
